package com.wcx.create.factory.demo2.abs;

import com.wcx.create.factory.demo2.abs.factory.RouJiaMoYLFactory;
import com.wcx.create.factory.demo2.abs.model.Meat;
import com.wcx.create.factory.demo2.abs.model.YuanLiao;

/**
 * 项目: design-pattern-githupdemo
 * <p>
 * 功能描述: 肉夹馍
 *
 * @author: WuChengXing
 * @create: 2021-01-08 14:59
 **/
public abstract class RouJiaMo {

    public String name;

    /**
     * 准备工作
     */
    public void prepare(RouJiaMoYLFactory ylFactory) {
        Meat meat = ylFactory.createMeat();
        YuanLiao yuanliao = ylFactory.createYuanliao();
        System.out.println("使用官方的原料" + meat + " , " + yuanliao + "作为原材料制作肉夹馍 ");
    }

    /**
     * 使用你们的专用袋-包装
     */
    public void pack() {
        System.out.println("肉夹馍-专用袋-包装");
    }

    /**
     * 秘制设备-烘烤2分钟
     */
    public void fire() {
        System.out.println("肉夹馍-专用设备-烘烤");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
